#include <iostream>
#include<string>
using namespace std;
int main()
{
    string str;
    cin >> str;
    int ret = 0;
    int r = 0, l = 0;
    int rm = 0;
    int lm = 0;
    while (r < str.size())
    {
        while ('a' <= str[r] && str[r] <= 'z')
        {
            r++;
        }
        l = r;
        while ('0' <= str[r] && str[r] <= '9')
        {
            if (ret < r - l + 1)
            {
                ret = r - l + 1;
                rm = r;
                lm = l;
            }
            r++;
        }
        r++;
    }
    for (int i = lm; i <= rm; i++)
    {
        cout << str[i];
    }

}